#pragma once

#ifndef _CGUILDSHOP_H_
#define _CGUILDSHOP_H_

#include "CItemContainer.h"

class CShopItem;

class CGuildShop : public CItemContainer 
{

public:
	CGuildShop(unsigned short guildID);
	~CGuildShop();

	void setId(unsigned short id);
	unsigned short getId();

	unsigned char getItemSlotId(unsigned short itemID);

	void setGuildSize(unsigned char size);

	void setPrice(CItem* item, unsigned char slotID, unsigned long price); 
	unsigned long getPrice(unsigned short itemID);

	void setSellPrice(CItem* item, unsigned char slotID, unsigned long price);
	unsigned long getSellPrice(unsigned short itemID);

	void addQuantity(unsigned short itemID, unsigned char quantity);
	void removeQuantity(unsigned short itemID, unsigned char quantity);
	unsigned char getMaxQuantity(unsigned short itemID);

	void updatePrices();
	void restock();

	void itemIsInBuyMenu(CShopItem* item, bool isInBuyMenu);
	bool itemIsInBuyMenu(unsigned short itemID);

	void loadSQL();

private:
	unsigned short m_id;
	bool * m_showInBuyMenu;
	unsigned long * m_currPriceList;
	unsigned long * m_currSellList;
};

#endif
